package nvr.utils;


import com.study.base.SpringContextHolder;
import nvr.utils.commandManager.CommandManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


public class CommandManagerUtils {
    private static Logger logger = LoggerFactory.getLogger(CommandManagerUtils.class);

    /**
     * 停止  ffmpeg 任务
     */
    public static void stopAllffmpeg() {
        try {
            CommandManager manager = SpringContextHolder.getBean("commandManager");
            manager.stopAll();
            manager.destory();
        } catch (Exception e) {
            logger.error(e.getMessage());
        }
    }
}
